# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=py3-django-annoying
#_pkgreal is used by apkbuild-pypi to find modules at PyPI
_pkgreal=django-annoying
pkgver=0.10.7
# did not tag release
_gittag=d1edd7fa54b4e29699660e353013812b7679fb65
pkgrel=0
pkgdesc="This is a django application that tries to eliminate annoying things in the Django framework."
url="https://pypi.python.org/project/django-annoying"
arch="noarch"
license="BSD"
depends="py3-django py3-six py3-flake8 py3-isort"
checkdepends="python3-dev py3-pytest py3-pytest-django"
makedepends="py3-setuptools py3-gpep517 py3-wheel"
source="
	$pkgname-$_gittag.tar.gz::https://github.com/skorokithakis/django-annoying/archive/$_gittag.tar.gz
	"
builddir="$srcdir/$_pkgreal-$_gittag"
subpackages="$pkgname-pyc"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	DJANGO_SETTINGS_MODULE=tests.settings .testenv/bin/python3 -m pytest -v
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
4404b281d9d38ca605e91281a5aa844a69cfd501bd68753eda88d48964c7a53edccc5b66f8422039135dcf01a64f0f7c1a010865a31a121cfe24867c1ede9ff7  py3-django-annoying-d1edd7fa54b4e29699660e353013812b7679fb65.tar.gz
"
